# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=qcoro
pkgver=0.3.0
pkgrel=0
pkgdesc="C++ Coroutines for Qt"
url="https://qcoro.dvratil.cz"
arch="all"
license="MIT"
makedepends="
	cmake
	qt5-qtbase-dev
	"
checkdepends="dbus-x11"
subpackages="$pkgname-dev"
source="https://github.com/danvratil/qcoro/archive/v$pkgver/qcoro-v$pkgver.tar.gz"

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_SHARED_LIBS=TRUE
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
16d8aa4ec0f6f45e5c7d716e18636a506524e44d6ed43612326911df2331f01a5b10f86a7b7d0ed307c1220b1b60aca3047143a5e6376f81ed9a081f7c922a38  qcoro-v0.3.0.tar.gz
"
